package com.crm.common.model.Enum;

/**
 * 支付方式
 * @author luojie
 * @date 2021/8/9 9:13
 */
public enum PaymentMethodEnum {

    OFFLINE_PAYMENT("2","线下支付"),

    BALANCE_PAYMENT("3","余额支付"),

    TRANSFER_IN_PAYMENT("4","转入额支付"),

    BALANCE_TRANSFER_AMOUNT_PAYMENT("5","余额+转入额支付"),

    WE_CHAT_PAY("6","微信支付");

    private String paymentMethodCode;
    private String paymentMethodInfo;

    PaymentMethodEnum(String paymentMethodCode, String paymentMethodInfo){
        this.paymentMethodCode = paymentMethodCode;
        this.paymentMethodInfo = paymentMethodInfo;
    }

    public static String getValue(String paymentMethodCode) {
        for (PaymentMethodEnum ele : values()) {
            if(ele.paymentMethodCode.equals(paymentMethodCode)) return ele.paymentMethodInfo;
        }
        return null;
    }

    public String getPaymentMethod(){
        return paymentMethodCode;
    }

    public String getPaymentMethodInfo(){
        return paymentMethodInfo;
    }
}
